package com.yang.designmode.ActionMode.chainResponsibility;
// 具体处理者2
public class ConcreteHandlerB extends Handler {
    @Override
    public void handleRequest(String request) {
        if ("B".equals(request)) {
            System.out.println("ConcreteHandlerB 处理了请求");
        } else if (nextHandler != null) {
            nextHandler.handleRequest(request);
        }
    }
}